<template>
  <div>
    <van-swipe :autoplay="autoplay" indicator-color="blue">
      <van-swipe-item v-for="(item, i) in list" :key="i">
        <img v-lazy="item[imgStr]" width="100%" :height="height" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: 'swipeBox',
  props: {
    // 滚动间隔
    autoplay: {
      type: Number,
      default: 3000
    },
    // 渲染的数组
    list: {
      type: Array,
      required: true
    },
    imgStr: {
      type: String,
      required: true
    },
    height: {
      type: String
    }
  }
}
</script>

<style lang='less' scoped>

</style>
